import request from "@/utils/request.js"

// 获取所有频道
export const getAllChannels = ()=>{
    return request({
        method:'get',
        url:'/v1_0/channels'
    })
}


export const addUserChannel = channel=>{
    return request({
        method:"patch",
        url:"/v1_0/user/channels",
        data:{
            channels:[channel]
        }
    })
}


export const delUserChannel = targetId=>{
    return request({
        method:"delete",
        url:`/v1_0/user/channels/${targetId}`,
    })
}